#ifndef NODE_HPP
#define NODE_HPP

#include <vector>
#include <utility>
#include <cmath>

class Node {
public:
	static int size,maxMoves;
	int conflicts,moves,h;
	bool done;
	std::vector< std::pair<int,int> > queens;
	std::vector<int> nconfl;
	std::vector<Node> children;
	
	//Constructors
	Node(const std::vector< std::pair<int,int> > &,int,int,int);
	Node(const std::vector< std::pair<int,int> > &,int);

	//moves specified queen either up or down
	void move(int,int);
	//expand node
	void expand(std::vector<Node*> &);
private:
	//run heuristic function
	void _h();
	//counts number of conflicts
	void countConflicts();
	//populate the list of children states
	void createChildrenList();
	//add possible solution states to list
	void addChildren(std::vector<Node*> &);
};

#endif